package com.supor.aiot.mine.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.supor.aiot.common.entity.DictionaryBean;

/**
 * ---------------------------------------------------------------- <br>
 * Copyright (C) 2014-2021, by het, ShenZhen, All rights reserved.  <br>
 * ---------------------------------------------------------------- <br>
 * <p>
 * 描述: Dictionary <br>
 * 作者: lei <br>
 * 日期: 2021/9/2 <br>
 */
public class Dictionary implements Parcelable {
    public boolean isSelect;
    public DictionaryBean dictionaryBean;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
        dest.writeParcelable(this.dictionaryBean, flags);
    }

    public Dictionary() {
    }

    protected Dictionary(Parcel in) {
        this.isSelect = in.readByte() != 0;
        this.dictionaryBean = in.readParcelable(DictionaryBean.class.getClassLoader());
    }

    public static final Creator<Dictionary> CREATOR = new Creator<Dictionary>() {
        @Override
        public Dictionary createFromParcel(Parcel source) {
            return new Dictionary(source);
        }

        @Override
        public Dictionary[] newArray(int size) {
            return new Dictionary[size];
        }
    };
}
